package com.yuanfeng.activity.controller;

import com.yuanfeng.commoms.util.ResponseResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @ClassName ActivityShareGetRedpacketGradeController
 * @Description
 * @Author hyq
 * @Date 2023/7/11 11:31
 * @Version 1.0
 **/
@RestController
@RequestMapping("activity/redpacketGrade")
public class ActivityShareGetRedpacketGradeController extends BaseController{


    /**
     * 新增或编辑分享送红包规则对应的等级
     *
     * @return
     */
    @PostMapping("/update")
    public ResponseResult updateShareGetRpGrade(@RequestBody Map<String, Object> param) {
        ResponseResult result = activityShareGetRedpacketGradeService.updateShareGetRpGrade(param);
        return result;
    }

    /**
     * 删除分享送红包规则对应的等级
     *
     * @return
     */
    @PostMapping("/delete")
    public ResponseResult deleteShareGetRpGrade(@RequestBody Map<String, Object> param) {
        ResponseResult result = activityShareGetRedpacketGradeService.deleteShareGetRpGrade(param);
        return result;
    }


    /**
     * 新增或编辑分享送红包规则对应的等级
     *
     * @return
     */
    @PostMapping("/query")
    public ResponseResult queryShareGetRpGrade(@RequestBody Map<String, Object> param) {
        ResponseResult result = activityShareGetRedpacketGradeService.queryShareGetRpGrade(param);
        return result;
    }

}
